import request from "./request";
import apiConfig from "./config";
import { getApiPath } from "./util";
export const transactionListApi = function (data, params) {
  const {
    transactionList: { path, method },
  } = apiConfig;
  return request({
    method,
    url: getApiPath(path),
    data,
    params,
  });
};
export const transactionVerifyApi = function (data, params) {
  const {
    transactionVerify: { path, method },
  } = apiConfig;
  return request({
    method,
    url: getApiPath(path),
    data,
    params,
  });
};

export const announcementListApi = function (data, params) {
  const {
    announcementList: { path, method },
  } = apiConfig;
  return request({
    method,
    url: getApiPath(path),
    data,
    params,
  });
};

export const announcementAddApi = function (data, params) {
  const {
    announcementAdd: { path, method },
  } = apiConfig;
  return request({
    method,
    url: getApiPath(path),
    data,
    params,
  });
};

export const announcementVerifyApi = function (data, params) {
  const {
    announcementVerify: { path, method },
  } = apiConfig;
  return request({
    method,
    url: getApiPath(path),
    data,
    params,
  });
};

export const announcementDetailApi = function (data, params) {
  const {
    announcementDetail: { path, method },
  } = apiConfig;
  return request({
    method,
    url: getApiPath(path),
    data,
    params,
  });
};

export const announcementChangeApi = function (data, params) {
  const {
    announcementChange: { path, method },
  } = apiConfig;
  return request({
    method,
    url: getApiPath(path),
    data,
    params,
  });
};
